<template>
  <div>
    <myNav></myNav>
    <router-view />
    <foot></foot>
  </div>

</template>

<script>
import myNav from "@/components/myNav.vue";
import foot from "@/components/foot.vue";
import {getToken} from "@/store/token";

export default {
  name: "home",
  components: {foot, myNav},
  beforeCreate() {
    if (getToken("role") === "admin") {
      this.$router.push({path: "/admin"})
    }
  }
}
</script>
<style scoped>

</style>